<?php if (!defined('NOVA_RUN')) die('You can\'t access this file directly!');

/*
-------------------------------------------------------
*
*   NovaBoard 2
*   Copyright © 2011 NovaBoard team
*
*--------------------------------------------------------
*
*   Official site: www.novaboard.net
*   Contact e-mail: support@novaboard.net
*
*   GNU General Public License, version 2:
*   http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/

class Error_Action extends Action
{
	// current action name
	var $action = 'error';

	// avaliable methods
	var $methods = array('view');

	// default method
	var $default = 'view';

	public function view()
	{
		if (@lang::instance()->get('err', Router::param(0)))
		{
			tpl::instance()->assign('err', lang::instance()->get('err', Router::param(0)));
			tpl::instance()->show('error');
		}
		else
		{
			Engine::not_found();
		}
	}
}
